#!/usr/bin/pyton3
# -*- coding:utf-8 -*-
"""
记录错误信息 logging模块
"""
import logging


def foo(s):
    return 10 / int(s)


def bar(s):
    return foo(s) * 2


def main():
    try:
        print(bar('0'))
    except Exception as e:
        logging.exception(e)
    finally:
        print('finally...')


if __name__ == "__main__":
    main()
    print('end')
